import request from '@/utils/request'

// 查询需求列表
export function listRequirement(query) {
  return request({
    url: '/order/requirement/list',
    method: 'get',
    params: query
  })
}

// // 查询需求详细
// export function getRequirement(id) {
//   return request({
//     url: '/order/requirement/' + id,
//     method: 'get'
//   })
// }


// 根据订单id数组查询
export function listRequirementByOrderIds(query) {
  return request({
    url: '/order/requirement/orderIds',
    method: 'get',
    params: query
  })
}

// 新增需求
export function addRequirement(data) {
  return request({
    url: '/order/requirement',
    method: 'post',
    data: data
  })
}

// 修改需求
export function updateRequirement(data) {
  return request({
    url: '/order/requirement',
    method: 'put',
    data: data
  })
}


// 删除需求
export function delRequirement(id) {
  return request({
    url: '/order/requirement/' + id,
    method: 'delete'
  })
}
